package com.jyxd.web.data.czhisdata;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 观察结果表
 */
@Entity
@Table(name = "table_observation_result")
@Data
@ApiModel("观察结果实体")
public class ObservationResult implements Serializable {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator="system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;


    /**
     * 检验方法
     */
    @Column(name = "observation_method")
    private String observationMethod;

    /**
     * 项目信息
     */
    @Column(name = "observation_identifier")
    private String observationIdentifier;

    /**
     * 项目结果
     */
    @Column(name = "observation_value")
    private String observationValue;

    /**
     * 项目单位
     */
    @Column(name = "project_units")
    private String projectUnits;

    /**
     * 结果类型
     */
    @Column(name = "value_type")
    private String valueType;

    /**
     * 结果定量参考值(高)
     */
    @Column(name = "references_range_high")
    private String referencesRangeHigh;

    /**
     * 结果定量参考值(低)
     */
    @Column(name = "references_range_low")
    private String referencesRangeLow;

    /**
     * 结果定量参考值
     */
    @Column(name = "references_range_qualitative")
    private String referencesRangeQualitative;

    /**
     * 异常标志
     */
    @Column(name = "abnormal_flags")
    private String abnormalFlags;

    /**
     * 显示顺序
     */
    @Column(name = "sisplay_seq_no")
    private String displaySeqNo;

    /**
     * 观察结果时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "dtof_the_observation")
    private Date dTOfTheObservation;

    /**
     * 关联表主键id
     */
    @ApiModelProperty("关联表主键id")
    @Column(name = "re_table_id")
    private String reTableId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "creat_time")
    private Date creatTime;
}
